﻿<%@ Page Title="" Language="C#" MasterPageFile="~/source/masterpage/Base.Master"
    AutoEventWireup="true" CodeBehind="ProductsManagement.aspx.cs" Inherits="QLK.Web.ProductsDetails" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">


    <script src="js/jquery.tooltip.pack.js" type="text/javascript"></script>
    
    <link href="/css/jquery.tooltip.css" rel="stylesheet" type="text/css" />

    <script src="js/jquery.tooltip.min.js" type="text/javascript"></script>
    
    <script src="/js/jquery.js" type="text/javascript"></script>

    <script src="/js/jquery.bgiframe.js" type="text/javascript"></script>

    <script src="/js/jquery.dimensions.js" type="text/javascript"></script>

    <script src="/js/jquery.tooltip.js" type="text/javascript"></script>

    <script src="/js/chili-1.7.pack.js" type="text/javascript"></script>

    <script type="text/javascript">
        $(function() {
            $('#divProducts img').tooltip({
                track: true, 
                delay: 0, 
                showURL: false, 
                showBody: " - ", 
                fade: 250,
                bodyHandler: function() {
                    return $("<img/>").attr("src", this.src);
                }
            });
        }
             );
    </script>

    <title>Products Details</title>
    <style type="text/css">
        .style1
        {
            width: 100%;
        }
        
        #divProducts
        {
            text-align: left;
        }
        .imgStyle
        {
            width: 50px;
            height: auto;           
        }
                
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
   
    <div>
        <table class="style1">
            <tr>
                <td style="text-align: center">
                    <b>PRODUCTS&#39; DETAILS</b>
                </td>
            </tr>
            <tr>
                <td style="text-align: left">
                    <br />
                    <asp:LinkButton ID="btnAdd" runat="server" ForeColor="Lime" OnClick="btnAdd_Click">Add more products</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnDelete" runat="server" ForeColor="Lime" OnClick="btnDelete_Click">Delete checked</asp:LinkButton>
                    <br />
                </td>
            </tr>
            <tr>
                <td style="text-align: left">
                    <asp:Label ID="lblWarning" runat="server" CssClass="msg" ></asp:Label>
                </td>
            </tr>
            <tr>
                <td style="text-align: center">
                    <center>
                        <div id="divProducts">
                            <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                                <ContentTemplate>
                                    <asp:GridView ID="grvProducts" runat="server" AllowPaging="True"
                                        OnPageIndexChanging="grvProducts_PageIndexChanging" 
                                        AutoGenerateColumns="False" 
                                        onselectedindexchanged="grvProducts_SelectedIndexChanged" PageSize="7">
                                        <Columns>
                                            <asp:TemplateField HeaderText="Edit">
                                                <EditItemTemplate>
                                                    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
                                                </EditItemTemplate>
                                                <ItemTemplate>
                                                    <asp:ImageButton ID="ImgEdit" runat="server" ImageUrl="~/images/edit_desc.gif" OnClick="ImgEdit_Click"
                                                    CommandArgument="<%# Eval(QLK.Database.Columns.ProductID) %>" CommandName="Edit" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:TemplateField HeaderText="Check">           
                                                <ItemTemplate>
                                                    <asp:CheckBox ID="ckDelete" runat="server" _ProID='<%# Eval(QLK.Database.Columns.ProductID) %>' />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                            <asp:BoundField DataField="UPC" HeaderText="UPC" />
                                            <asp:BoundField DataField="ProductName" HeaderText="ProductName" />
                                            <asp:BoundField DataField="ManufactureName" HeaderText="Manufactures" />
                                            <asp:BoundField DataField="CategoryName" HeaderText="Categories" />
                                            <asp:TemplateField HeaderText="Images">
                                                <ItemTemplate>
                                                    <asp:Image ID="ImgProduct" runat="server" ImageUrl='<%# Eval("Image") %>' 
                                                        Height="30px" Width="30px" CssClass="imgStyle" BorderStyle="None" />
                                                </ItemTemplate>
                                            </asp:TemplateField>
                                        </Columns>
                                    </asp:GridView>
                                </ContentTemplate>
                            </asp:UpdatePanel>
                        </div>
                    </center>
                </td>
            </tr>
            <tr>
                <td style="text-align: left">
                    <br />
                    <asp:LinkButton ID="btnAdd0" runat="server" ForeColor="Lime" 
                        OnClick="btnAdd_Click">Add more products</asp:LinkButton>
                    &nbsp;&nbsp;
                    <asp:LinkButton ID="btnDelete0" runat="server" ForeColor="Lime" 
                        OnClick="btnDelete_Click">Delete checked</asp:LinkButton>
                    <br />
                </td>
            </tr>
            <tr>
                <td style="text-align: left">
                    &nbsp;</td>
            </tr>
        </table>
    </div>
</asp:Content>
